package demo2;

public class Card {
    private String color ;
    private int rank ;

    public Card(String color, int rank) {
        this.color = color;
        this.rank = rank;
    }

    @Override
    public String toString() {


        return this.color + " " +
                (this.rank==11?"J":this.rank==12?"Q":this.rank==13?"K":this.rank);
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }
}
